﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>菜单选择</title>
<script type="text/javascript" src="js/wtree.js"></script>
<link rel="StyleSheet" href="css/dtree.css" type="text/css"/>
<style type="text/css">
</style>
</head>

<body>
	
<center>
	<p><a href="javascript: d.openAll();">全部展开</a> | <a href="javascript: d.closeAll();">全部关闭</a></p>
	<input type="button" value="确定" onclick="sel()" />　
	<input type="button" value="关闭" onclick="window.close()" />
</center>

<div id="systree">
</div>

<script type="text/javascript">
	function sel(){
		var selids=d.getCheckedNodes();
		var str="";
		for(var n=0;n<selids.length; n++){
			str+=selids[n]+";";
		}
		alert(str);
	}
	
	var d = new dTree('d','images/system/menu/');
//	d.config.folderLinks=true;
//	d.config.useCookies=true;
		d.config.check=true;
		
		d.add(0,-1,'系统菜单',"javascript:;",'提示');
	
		d.add(100,0,'系统管理',"javascript:;",'所有系统管理功能');
	
		d.add(790,100,'菜单管理',"javascript:;",'菜单管理');
	
		d.add(800,100,'组织机构',"javascript:;",'');
	
		d.add(810,100,'用户管理',"javascript:;",'');
		
		d.add(3,810,'用户名',"javascript:;",'');
		
		d.add(102,0,'系统机构',"javascript:;",'');
	
		d.add(300,102,'人员管理',"javascript:;",'');
	
		d.add(301,102,'部门管理',"javascript:;",'');
		
		d.add(302,102,'机构管理',"javascript:;",'');
	
		d.add(103,0,'权限管理',"javascript:;",'');
	
		d.add(400,103,'角色维护',"javascript:;",'');
	
		d.add(401,103,'功能分配',"javascript:;",'');
	
		d.add(402,103,'角色分配',"javascript:;",'');

	document.getElementById('systree').innerHTML = d;
//	var funcs = eval("("+"{funcs:[{menudm:'0'},{menudm:'100'},{menudm:'790'},{menudm:'800'},{menudm:'810'}]}"+")");
//	for(var n=0; n<funcs.funcs.length;n++){
//		d.co(funcs.funcs[n].menudm).checked=true;
//	}
</script>


</body>
